package com.efast.dmom.mgmt.controller.mes.report;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.efast.dmom.mgmt.bean.mes.report.EachWorkShopPlanCompleteRateBean;
import com.efast.dmom.mgmt.bean.mes.report.EachWorkShopPlanCompletedRateReturnBean;
import com.efast.dmom.mgmt.bean.mes.report.IntervalStatisticalReportBean;
import com.efast.dmom.mgmt.bean.mes.report.IntervalStatisticalReportReturnBean;
import com.efast.dmom.mgmt.service.mes.report.IntervalStatisticalReportService;


@Controller
@RequestMapping("/statisticalReportController")
public class IntervalStatisticalReportController {

	@Autowired
	private IntervalStatisticalReportService intervalStatisticalReportService;

	// 获取各车间计划完成率
	@RequestMapping(value = "/getWorkshopPlanCompletionRate")
	public @ResponseBody EachWorkShopPlanCompletedRateReturnBean getEachWorkshopPlanCompletionRate(
			@RequestBody EachWorkShopPlanCompleteRateBean acceptData) {
		return intervalStatisticalReportService.getEachWorkshopPlanCompletionRate(acceptData);
	}

	// 获取区间统计日报表
	@RequestMapping(value = "/getIntervalStatisticalReport")
	public @ResponseBody List<IntervalStatisticalReportReturnBean> getIntervalStatisticalReport(
			@RequestBody IntervalStatisticalReportBean acceptData) {
		return intervalStatisticalReportService.getIntervalStatisticalReport(acceptData);
	}

	// 获取订单号下拉框
	@RequestMapping(value = "/getPlanOrderNo")
	public @ResponseBody List<String> getPlanOrderNo() {
		return intervalStatisticalReportService.getPlanOrderNo();
	}

	// 获取区间名称下拉框
	@RequestMapping(value = "/getIntervalName")
	public @ResponseBody List<Map<Object, Object>> getIntervalName() {
		return intervalStatisticalReportService.getIntervalName();
	}

	// 获取颜色下拉框
	@RequestMapping(value = "/getColor")
	public @ResponseBody List<Map<String, String>> getColor() {
		return intervalStatisticalReportService.getColor();
	}

	// 获取车型下拉框
	@RequestMapping(value = "/getCarModel")
	public @ResponseBody List<String> getCarModel() {
		return intervalStatisticalReportService.getCarModel();
	}
}
